
	 Ext.onReady(function(){  
        Ext.define('user',{  
            extend:'Ext.data.Model',  
            fields:[  
            {name:'userid',type:'string'},  
            {name:'username',type:'string'},  
            {name:'loginame',type:'string'},
            {name:'posts',type:'string'},  
            {name:'followers',type:'string'},
            {name:'following',type:'string'},
            {name:'signup',type:'string'}
            ]  
        });  
        var userStore=Ext.create('Ext.data.Store',{  
            model:'user',  
            pageSize:10,//每页显示数目  
            proxy:{  
                type:'ajax',  
                url:'/userRedis/userlist.do',//提供Json字符串的页面  
                reader:{  
                    type:'json',  
                    root:'data'  
                    //totalProperty:'total'//总项数  
                }  
            },  
            autoLoad:true  
        }); 
       
        Ext.create('Ext.grid.Panel',{  
            title:'用户信息表',  
            renderTo: Ext.getBody(),  
            store:userStore,//此表格控件的数据由userStore数据中心提供支持  
            //宽度
            layout:'fit',
            //height:500,
            columns:[ 
          
            {text:'ID',dataIndex:'userid',flex:1},  
            {text:'用户名',dataIndex:'username',flex:1},  
            {text:'昵称',dataIndex:'loginame',flex:1},
            {text:'发布',dataIndex:'posts',flex:1},  
            {text:'粉丝',dataIndex:'followers',flex:1},
             {text:'关注',dataIndex:'following',flex:1},
             {text:'时间',dataIndex:'signup',flex:1}  
            ],  
            bbar:{  
                xtype:'pagingtoolbar',//底部工具栏是分页工具栏  
                store:userStore,//按照userStore的数据进行分页  
                displayInfo:true//显示共XX页，每页显示XX条的信息  
            }   
        });  
      
        });